const express = require('express');
const admin = express.Router();
//渲染登录页面
admin.get('/login', require('./admin/loginPage'))
    //渲染用户页面
admin.get('/user', require('./admin/userPage'))
    //渲染新增用户模板
admin.get('/user-edit', require('./admin/user-edit'))
admin.post('/user-edit', require('./admin/user-edit-fn'))
admin.post('/user-modify', require('./admin/user-modify'))
    //登录功能
admin.post('/login', require('./admin/login'))
admin.get('/delete', require('./admin/delete'))
    //渲染文章管理页面
admin.get('/article', require('./admin/article'))
admin.get('/article-edit', require('./admin/article-edit'))
admin.post('/article-add', require('./admin/article-add'))
admin.post('/article-modify', require('./admin/article-modify'))
admin.get('/article-delete', require('./admin/article-delete'))
    //退出功能
admin.get('/loginout', require('./admin/loginout'))
module.exports = admin;